home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 10 / AACD 10.iso / AACD / Resources / Online / Term / Extras / Source / gtlayout-source.lha / LTP_RPortAttrs.c < prev    next >
C/C++ Source or Header  |  1996-03-18  |  1KB  |  66 lines

  1. /*
  2. **    GadTools layout toolkit
  3. **
  4. **    Copyright © 1993-1996 by Olaf `Olsen' Barthel
  5. **        Freely distributable.
  6. **
  7. **    :ts=4
  8. */
  9.  
  10. #ifndef _GTLAYOUT_GLOBAL_H
  11. #include "gtlayout_global.h"
  12. #endif
  13.  
  14.  
  15. /*****************************************************************************/
  16.  
  17.  
  18. VOID
  19. LTP_SetPens(struct RastPort *rp,LONG apen,LONG bpen,LONG mode)
  20. {
  21.     if(V39)
  22.         SetABPenDrMd(rp,apen,bpen,mode);
  23.     else
  24.     {
  25.         if(apen != rp->FgPen)
  26.             SetAPen(rp,apen);
  27.  
  28.         if(bpen != rp->BgPen)
  29.             SetBPen(rp,bpen);
  30.  
  31.         if(mode != rp->DrawMode)
  32.             SetDrMd(rp,mode);
  33.     }
  34. }
  35.  
  36.  
  37. /*****************************************************************************/
  38.  
  39.  
  40. VOID
  41. LTP_SetAPen(struct RastPort *rp,LONG apen)
  42. {
  43.     ULONG pen;
  44.  
  45.     if(V39)
  46.         pen = GetAPen(rp);
  47.     else
  48.         pen = rp->FgPen;
  49.  
  50.     if(pen != apen)
  51.         SetAPen(rp,apen);
  52. }
  53.  
  54.  
  55. /*****************************************************************************/
  56.  
  57.  
  58. VOID
  59. LTP_SetFont(LayoutHandle *handle,struct TextFont *font)
  60. {
  61.     SetFont(&handle->RPort,font);
  62.  
  63.     if(handle->Window)
  64.         SetFont(handle->Window->RPort,font);
  65. }
  66.